#include<stdio.h>

struct peo 
{
    char name[9];
    int a;
    int b;
    int c;
    int sum;
};

int main()
{
   int n=0;
   scanf("%d",&n);
   struct peo s[10000];
   int max=0;
   int maxname=0;
   for(int i=0;i<n;i++)
   {
      scanf("%s %d %d %d",s[i].name,&s[i].a,&s[i].b,&s[i].c);
      s[i].sum=s[i].a+s[i].b+s[i].c;
      if(s[i].sum>max)
      {
        max=s[i].sum;
        maxname=i;
      }
   }
   printf("%s %d %d %d",s[maxname].name,s[maxname].a,s[maxname].b,s[maxname].c);
}